import time

c_time = time.time()

local_time = time.localtime(c_time)

print("本地时间对象（tuple格式）:", local_time)

f_time = time.strftime("%Y-%m-%d %H:%M:%S", local_time)

print("格式化后的时间字符串:", f_time)